package com.xl.web.service.area;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.xl.base.annotation.DataSource;
import com.xl.base.service.BaseService;
import com.xl.core.enums.SourceEnum;
import com.xl.web.dao.area.AreaDao;
import com.xl.web.entity.area.Area;

@Service(value = "areaService")
public class AreaService<T extends Area> extends BaseService<Area> {

	@Autowired
	private AreaDao<Area> areaDao;

	@Override
	public AreaDao<Area> getDao() {
		return this.areaDao;
	}

	/**
	 * 根据条件获取到区域信息
	 * 
	 * @param area
	 * @return
	 */
	@DataSource(source = SourceEnum.TYPE_SLAVE)
	public List<Area> getDictList(Area area) {
		return getDao().getAreaList(area);
	}
}